Field Parameters

The parameters for the Field Parameters box are described in the following table.

Parameters Description for Field Parameters Box

Parameter

Description

Update Training

This parameter allows for training records to be updated for a particular employee assigned to a form. This parameter is used in conjunction with an object list field definition of single or multiple where List Object Type is Document.

Entered as UPDATE_TRAINING=YES

Update User and Document Field

This allows you to designate which field on the form contains the name of the employee and the documents for which you would like to update the training. This works in conjunction with a signature that would be required for the update to occur.

UPDATE_TRAINING_USER_FIELD=FORM_0001:Item_001;UPDATE_TRAINING_DOCUMENT_FIELD=FORM_0001:ITEM_003

This designates that user located in Form_0001:Item_001 will have their training updated with documents located on Form_001:Item_003.

Refer to Parameter Example 1 in Field Parameter Examples.

Document Preview Required

This parameter forces an individual to preview the documents before any type of signoff can occur. You must designate the form and fields for documents and users when using this parameter. You can have multiple document fields defined.

PREVIEW_REQUIRED=YES;PREVIEW_REQUIRED_DOCUMENT_FIELD=Form_0001:Item_001,Form_0001:Item_004,Form_001:Item_005,Form_0001:Item_005;PREVIEW_REQUIRED_USER_FIELD=Form_0001:Item_008

Store and Display Preview Date

This allows you to actually store and display the preview date on the form after opening the documents.

STORE_PREVIEW_DATE=YES;DISPLAY_PREVIEW_DATE=YES;STORE_DOCUMENT_REVISION=YES

Refer to Parameter Example 2 in Field Parameter Examples.

Update Document Revision

This parameter allows for updating the revision to the current revision if the document was added to the form and later updated. This would only be valid for forms that have not already been locked by a signoff.

AUTO_UPDATE_DOCUMENT_REVISION=YES

Locking a Sub-Form

This parameter field would be used to lock a sub-form only upon a signature.

LOCK_SUBFORM_ON_SIGNATURE=YES

Storing Document Revision on Form

When adding documents to a form, you are able to store the actual document revision along with the document when adding data to the form. This revision number will be stored with the form when it is locked from changes.

STORE_DOCUMENT_REVISION

Adding the Packet Creator to a Form Page other than First Form

To include the initiator name on a page other than the first page of the form, use the Field Parameter option in Field Definition:

  • Set the Source Copy field to Read/Write.
  • Set the Source Form Field to none.
  • Add SOURCE_FIELD=Packet.CreateUser to Field Parameters.

Calculations

If you require fields to automatically calculate amounts, the following functions are available:

@SUM([Form_xxxx:Item_xxx])

@COUNT([Form_xxxx:Item_xxx])

@AVERAGE([Form_xxxx:Item_xxx])

@MIN([Form_xxxx:Item_xxx])

@MAX([Form_xxxx:Item_xxx])

The following example would calculate a subtotal using (Unit Price * Quantity):

FIELD_VALUE=[Form_0002:Item_001]*[Form_0002:Item_004]; NUMBER_FORMAT=0.00 Where Quantity is located on Form 2 field number 1; Unit price is located on Form 2 field number 4

Example:

Unit Price (*) Quantity = Subtotal using subforms

FIELD_VALUE=[Form_0001:Item_007]*[Form_0001:Item_011]; NUMBER_FORMAT=0.00

FIELD_VALUE=@SUM([Form_000X:Item_00X]);NUMBER_FORMAT= $#,0.00;

Example:

Subtotal of many fields

FIELD_VALUE=@SUM([Form_0001:Item_012]);NUMBER_FORMAT=0.00

To include a $, just include the $ character in the NUMBER_FORMAT.

Example:

NUMBER_FORMAT=$0.00.

To show commas as "thousands separators", you can just add a comma in the format:

NUMBER_FORMAT=#,0.00.

You can combine the dollar sign and the commas like this:

NUMBER_FORMAT=$#,0.00.

If you set the number format for the Total field, it should override the setting from the Unit Cost field. (If you don't set it explicitly, it will carry over from the other fields.)

NOTE: The "0" is used to indicate a digit that will always appear in the result, even if it is a zero. For example, to have at least one digit before the decimal point, and two digits after the decimal point:
Percentage Calculation
FIELD_VALUE=([Form_000x:Item_00x]/[Form_000x:Item_00x])*100;
NUMBER_FORMAT=0.0

If you would like to take the average of multiple fields together, the formula would look like this:

FIELD_VALUE=([Form_000x:Item_00X]+[Form_000x:Item_00x])/2;
NUMBER_FORMAT=0.000.

If you wanted to average 3 fields (or more), use the + sign to connect the fields and then divide by the number of fields you want to average. The example above is for averaging 2 fields. Make sure the fields are defined as numerical and also that the Special Field checkbox is selected.

If you would like to calculate a value based on the number of a response, (Example: Yes = 1, No=0) the formula would look like this:

FIELD_VALUE=IIF([Form_0002:Item_001] = 'YES',1, 0)+IIF([Form_0002:Item_002] = 'YES',1, 0);

If you would like to SUM up the number of Checkboxes checked on a form, the formula would look like this:

FIELD_VALUE=IIF([Form_0001:Item_006] = 'TRUE',1, 0)+IIF([Form_0001:Item_007] = 'TRUE',1, 0);

If you would like to COUNT the number of field that were populated, (Example: If the field has a response, count it, if it does not, do not count it.) the formula would look like this:

FIELD_VALUE=@COUNT([Form_0002:Item_001])+@COUNT([Form_0002:Item_002]);

If you would like to use the SUM function to add the results of multiple fields, the formula would look like this:

FIELD_VALUE=@SUM([Form_0002:Item_007])+@SUM([Form_0002:Item_008])+@SUM([Form_0002:Item_009]);

To calculate a PERCENTAGE based on the response entered into a form, the formula would look like this:

FIELD_VALUE=([Form_0002:Item_008]*100)/[Form_0002:Item_010];NUMBER_FORMAT=0.0;

To do SUBTRACTION in a form, the formula would look like this:

FIELD_VALUE=[Form_0001:Item_006]-[Form_0001:Item_024];NUMBER_FORMAT=0.00;

Here is an example of a nested IF statement:

FIELD_VALUE=IIF([Form_0001:Item_019]=0,'',IIF([Form_0001:Item_019]<=30,'1',IIF([Form_0001:Item_019]>30,'2','25')));NUMBER_FORMAT=0.0;

Comparing two fields using example of PASS and FAIL

In the Field Definition, make sure that the Special Field checkbox is selected, then enter a formula like the following into the Field Parameters field:

FIELD_VALUE=IIF([Form_0002:Item_002] >= [Form_0002:Item_004], 'PASS', 'FAIL');

If you want to autofill a field with a Yes/No value based on the calculated value of another field, you can use the sample below:

FIELD_VALUE=IIF([Form_000x:Item_00x] >= 1000.00, '1','0');

The ’1’,’0’ is the value for True and False respectively. In this example, a value of YES is returned when a particular field (i.e., Form 3 Item 5) was greater than $1,000.00. You are then able to use the compare option and route your form based on Yes or No.

NOTE: The function name is "IIF", not "IF", and the PASS and FAIL items are enclosed in single quotes. Also, make sure the Field Type is set to a Text format.

Automatically Load Job Requirements after Selecting a Job

This parameter allows for automatically loading a group of documents that are attached to a job. For example: with a Competency Assessment form, you might want to automatically load the job requirements after selecting the job. To use this function, you must select the Specified Field checkbox during Form Design for the document field.

NOTE: The Special Field checkbox must be selected to use this parameter.

Enter the following in the Field Parameters box for the document field. For example: the job is defined on form 0001 and the field is 015.

FIELD_VALUE=@REF_OBJECT_FIELD([Form_0001:Item_015],Related_Requirements);

UPDATE_WHEN=INITIAL_SAVE;

Options for UPDATE_WHEN= are as follows:

  • ALWAYS - Reloads the job requirements every time you read or edit the form.
  • INITIAL_SAVE - The first time the form is saved, the documents are added and will not change if requirements are changed for the job.
  • EMPTY - After clicking the Save button, if you clear out the values, it will reload. For example, if you selected one job and the job requirements have already been loaded and then you change the job, you need to empty out the prior job documents and then the new job requirement will reload.
  • REF_MODIFIED - If the job field is modified, then it will reload when you edit the form.

NOTE: This option only works if the job field is defined on the same form as the documents.

Grid Column Size (Subform)

This parameter allows for defining the size of the field when using Sub-Form grids.

DISPLAY_COLUMNS=<#>; Example: DISPLAY_COLUMNS=5;

External Form Attachments

This parameter allows for external attachments to be added to the report when merging form data onto a report template. The INCLUDE_IN_FORM_REPORT=1; parameter must be used for each attachment field you would like to include during the Generate Report function. The Create PDF Form Report checkbox must be selected and the Special Field checkbox unchecked. Attachments in Word or Excel will be converted to PDF before merging. Any attachments that are in PDF format will be left unchanged. Attachments will be added in the order displayed on the form.

Calculations Using Dates

  • DATEADD Will add or subtract from a date.
  • DATEDIFF Will find the difference between two dates.
  • DATEPART Returns a component of a date.

To subtract six months from a date field (note the negative number of months):

FIELD_VALUE=DATEADD(month, -6, [Form_XXXX:Item_XXX]); DATE_FORMAT=
Date_Only;

To add 24 months from a date field:

FIELD_VALUE=DATEADD(month, +24,[Form_XXXX:Item_XXX]); DATE_FORMAT=
Date_Only

To return the number of months between two date fields:

FIELD_VALUE=DATEDIFF(month, [Form_XXXX:Item_XXX], [Form_XXXX:Item_XXX]);

To return the "day of the year" from a date field:

FIELD_VALUE=DATEPART(dayofyear, [Form_XXXX:Item_XXX]);

Example: If the date was October 3rd the return value would be 277 indicating the 277th day of the year.

Example: If a field value is 10, the current date is 02/10/2019, and you want the new date to be 10 days added to the current date to auto-populate a new date, you would do the following:

FIELD_VALUE=DATEADD(day,[Form_0001:Item_001],Form_0001:Item_002]);

The following can also be used in place of the (day).

year

quarter

month

dayofyear

week

hour

minute

second

Sample Usage: Based on risk (major or minor), the recipient of the investigation must complete the activity by a certain date (14 days for Minor; 7 days for Major). The following was done.

  • Added a drop-down list with Minor and Major.
  • Added a value map, mapping Minor to 14 and Major to 7.
  • Added a Date Field [Form_0001:Item_001], which auto-populated with current date.
  • Added a Number Field [Form_0001:Item_002], which auto-populated based on Major or Minor.
  • Added an Investigation Recipient Due Date field to the form and added to the parameter:

FIELD_VALUE=DATEADD(day,[Form_0001:Item_001],Form_0001:Item_002]);

  • Selected the special field checkbox.

NOTE: You must select the Special Field checkbox in Form Design when using these auto-calculated parameters.

Pulling Data from Parent to Child or Child to Parent

For certain field types, this parameter allows for pulling data forward from one Form Packet to another Form Packet. The parameter that is used depends on whether you are pulling from a Parent to a Child Packet or from a Child to a Parent Packet. It is used in conjunction with the workflow in which one workflow (parent) launches another workflow (child). The parameters should be entered into the Parameter Box field in which you would like the data to be pulled forward.

FIELD_VALUE=[PARENT:Form_XXXX:Item_XXX]

FIELD_VALUE=[CHILD:Form_XXXX:Item_XXX]

For example: If you have a Non-Conformance form (Parent) that launches an CAPA form (Child) via the workflow, you might want to automatically pull data forward from Parent to the Child form.

NOTE: You must select the Special Field checkbox in Form Design when using these parameters.

This parameter is not valid for all field types such as Signature and File Attachments.

Editing Parent and Child Data

When pulling data from Parent to Child packets, you might want to control when the data is Read-Only or Read/Write. You have the following options for the ALLOW_EDIT= function.

NOTE: The following parameters only apply when pulling packet data from Parent to Child. Pulling from Child back to Parent will always be a Read-Only field.

  • ALLOW_EDIT=NO; (default) Child data will always be Read-Only when pulled from the Parent to the Child. For example: If the Parent field is empty, then the Child field will still be Read-Only.

NOTE: Since this is the default, there is no need to add this parameter if you want the Child data to always be Read-Only.

  • ALLOW_EDIT=YES; Child data will always be Read/Write when pulled from the Parent to the Child.
  • ALLOW_EDIT=IF_SOURCE_EMPTY; Child data will be Read/Write when the Parent field is empty (blank) and Read-Only when the Parent field contains a value.

Automatic Sequencing

If using Sub-Forms and you would like to do automatic sequencing, use the following in the Field Parameter box:

FIELD_VALUE=[FIELD_INFO:ITEM_SEQ];

The following settings must be checked for this function to operate.

  • Show All Sub-Forms In Grids Located on the General tab of the Form Group Detail page.
  • Special Field Located above the Field Parameters box on the Form Field Detail page.

Displaying Documents that are Not Yet Effective

When attaching controlled documents to the form packet, the system default is to check the effective date of the document before displaying. If it is necessary to display the current document that has been published but has not reached its effective date, you must place ALWAYS_SHOW_CURRENT_DOCUMENT_REVISION=YES; in the Parameter Field box and check the Special Field checkbox.

Displaying Document Revision Number

When using a setting called STORE_DOCUMENT_REVISION, you are able to determine if you want it to display the Document Revision Number with the Document ID. The default is YES. To turn off displaying the document revision number, enter DISPLAY_DOCUMENT_REVISION=NO; in the Field Parameters box.

Automatically Pulling Document Revision and Document Title

When entering a Document ID, you might want to automatically fill in Document Revision and Document Title fields. Use the following parameters, replacing the Xs with the Document ID Form and Field assignment.

  • In the Document ID field of the form, enter:

STORE_DOCUMENT_REVISION=True; DISPLAY_DOCUMENT_REVISION=NO;

in the Fields Parameters box.

  • In the Revision Number field, enter

FIELD_VALUE=@FIELD_VALUE_COMPONENT([Form_000X:Item_00X],1);

Make sure the Special Field Checkbox is checked.

  • In the Title field, enter:

FIELD_VALUE=@REF_DOCUMENT_FIELD([Form_000X:Item_00X], Title);

in the form field for the title of the document. Make sure the Special Field checkbox is checked.

Automatically Pulling Employee Number

When selecting an employee and wanting the system to automatically pull the employee number, use the following in the field parameter of the Employee number:

FIELD_VALUE=@REF_OBJECT_FIELD([Form_000X:Item_00X], Basic_UserCode);

The Xs are replaced with the form and field number of the Employee Selection field.

Include Signers Position in Form Report

When merging data from the form to the report, you can include the position of the signer. Include the following parameter in the Fields Parameters box of the Signature field:

INCLUDE_USERPOSITIONTITLE_IN_FORM_REPORT=YES;

NOTE: The signer position is pulled from the User table, in the field Position/Title. If you do not want the position to display, do not include the parameter.

Justifying Sub-Form data in Grid Format

When using Sub-Forms in Grid Format, you might want to control the justification of the data. Use the following parameters:

  • COLUMN_ALIGN=LEFT;
  • COLUMN_ALIGN=RIGHT;
  • COLUMN_ALIGN=CENTER;

Calculating MIN and MAX Using Dates

When using Sub-Forms, you may need to calculate MIN MAX using dates.

To get the latest (or highest) date in the field, use:

FIELD_VALUE=@DATE_MAX ([Form XXXX:Item_XXX]);

To get the oldest/lowest date in the field, use:

FIELD_VALUE=@DATE_MIN([Form_XXXX:Item_XXX]);

The Special Field checkbox must be selected. The results will be stored in a field that is not part of the Sub-Form.

Example: The following will calculate the MIN date that was used in the Sub-Form:

FIELD_VALUE=@DATE_MIN([Form_0002:Item_006]);

Adding Fields to Packet List

This parameter enables selecting which fields from the packet display on the Packet list.

SHOW_IN_SEARCH_RESULTS=1;

This parameter is best suited for the following field types:

  • Drop-Down Lists
  • True/False
  • Date
  • Other field types that do not contain sizeable amount of data.

NOTE: The column currently is not sortable. Certain field types will not display (Signature, Text Editors, and Attachments).

Adding Multiple Columns

For fields that are not part of a Sub-Form, you can have multiple columns for form entry by using the parameter LAYOUT_GROUP=<RowColumn>, which specifies the Layout Group in which the field should appear.

The format for the LAYOUT_GROUP value is a single letter followed by a number (e.g., A1, B3). The letter specifies a row, and the number is the column. For instance, A1 would refer to the first column of the first row, while B4 would be the fourth column of the second row.

The value can be specified for each field. But as a shortcut, if the value is not specified, then the previous value is used. This allows the form designer to specify only the value for the first field in each Layout Group.

Refer to Parameter Example 3 in Field Parameter Examples.

Automatically Setting YES to a True False field

eForms Modules – FIELD_VALUE=@MATCH_ANY, which allows for returning a YES condition on a True/False field based on a data value selected from a sub form field.

For example: To return a Yes value based on a sub form field that contains Scrap, you would enter the following parameter into the True/False field:

FIELD_VALUE=@MATCH_ANY([Form_XXXX:Item_XXX], 'Scrap');.

The XXX values are the Form and Item numbers of the field that would contain the Scrap data. The sub form Field Type should be a Text Box or Drop-Down List.

NOTE: The Special Field checkbox must be checked for the True/False field.

Pulling Header Description within the Form Data

If you would like to pull packet header descriptions from a parent to a child (or child to parent), you would use the following parameters:

FIELD_VALUE=[PARENT:PACKET.Description];

FIELD_VALUE=[CHILD:PACKET.Description];

NOTE: You will need to create a field on either the parent or child form that will contain the description that you will be pulling from the parent to the child or backwards from the child to parent.

Pulling Parent Header Directly into Child Header

Valid for child packets that are attached to workflows. Uses the checkbox option called Use Parent Description for the Create Packet command. For more information on the Create Packet command, refer to Workflow Functions and Creating a Workflow.

Auto Filling in N/A

For field types Free Form Text Box (2000) and (Unlimited), you can automatically fill in N/A when saving for form fields that are unused.

FIELD_VALUE='N/A'; UPDATE_WHEN=EMPTY; ALLOW_EDIT=TRUE;

NOTE: The Special Field checkbox must be checked for the True/False field.